<template>
  <div class="header">
    <img src="../../assets/icons/back.png" alt="返回" @click="goBack"/>
    <span>{{title}}</span>
  </div>
</template>

<script>
export default {
  name: 'Header',
  props: {
    title: String
  },
  data () {
    return {}
  },
  created () {
  },
  methods: {
    goBack () {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped lang="less">
  .header {
    position: relative;
    box-sizing: border-box;
    padding: 14px 15px;
    text-align: center;
    font-size: 17.5px;
    color: #0a0a0a;
    font-weight: 600;
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;

    img {
      position: absolute;
      content: '';
      display: block;
      width: 22px;
      height: 22px;
    }
  }
</style>
